{% extends "base.html" %}

{% block content %}
<h2>Import studentów z pliku</h2>
<form action="." method="post" enctype="multipart/form-data">
    <table>
        {{ form.as_table }}
        <tr>
            <td colspan=2><input id="submit" type="submit" value="wyślij" /></td>
        </tr>
    </table>
</form>

{% if students %}
<table>
    <tr>
        <th>Imię</th>
        <th>Nazwisko</th>
        <th>Nr Indeksu</th>
        <th>Kod</th>
        <th>Miejscowość</th>
    </tr>
    {% for student in students %}
    <tr>
        <td>{{ student.0 }}</td>
        <td>{{ student.1 }}</td>
        <td>{{ student.2 }}</td>
        <td>{{ student.3 }}</td>
        <td>{{ student.4 }}</td>
    </tr>
    {% endfor %}
    <tr><td><a href="/students/import/save/">Zapisz</a></td></tr>
</table>
{% endif %}
{% endblock %}

